/******************************/
/* Andy West and Gareth Gould */
/* Light counting program     */
/* 22-03-2010                 */
/******************************/

#include <io.h>

int main() 
{
  int i;
  unsigned char count;
  
  P5SEL=0x00;
  P5DIR=0xFF;
  
  while(1){
    for (count=0; count!=0xFF; count++){
      P5OUT=count;
      for (i=0; i<10000; i++) 
        nop();
    }
  }
}
